package com.example.travelhelper.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.travelhelper.pojo.CustomerService;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface CustomerServiceMapper extends BaseMapper<CustomerService> {
    @Update("update customer_service set cs_state=#{csState} where cs_id = #{csId}")
    public int updateCsState(@Param("csState") int csState,@Param("csId") String csId);

    @Select("select * from customer_service where id = 1")
    @ResultType(CustomerService.class)
    public List<CustomerService> listAllByCsState();

}
